package com.czh.springboot04.MyController;

import com.czh.springboot04.util.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

//@RestControllerAdvice
public class ExceptionController {
    @ExceptionHandler(Exception.class)
    public R exception(Exception e){
        return R.error("异常，捞的嘛就不谈了");
    }
}
